<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:component>
        <h:form rendered="#{Auth.loggedIn}" id="navigation-bar">
            <!-- normal user links -->
            <a href="/vrangogym-web/app/index.xhtml" class="navbar-links">Start</a>
            <a href="/vrangogym-web/app/booking.xhtml" class="navbar-links">Boka en tid</a>
            <a href="/vrangogym-web/app/editUserData.xhtml" class="navbar-links">Mina Uppgifter</a>
            <a href="/vrangogym-web/app/contact.xhtml" class="navbar-links">Kontakt</a>
            <h:outputLabel value="|" styleClass="navbar-separator"/>

            <!-- admin links -->
            <h:panelGroup rendered="#{Auth.admin}">
                <a href="/vrangogym-web/admin/bookings.xhtml" class="navbar-links">Bokningar</a>
                <a href="/vrangogym-web/admin/users.xhtml" class="navbar-links">Användare</a>
                <h:outputLabel value="|" styleClass="navbar-separator"/>
            </h:panelGroup>
            <!-- logout link -->
            <h:commandLink id="logout-link" action="#{Auth.logout()}" value="Logga ut" styleClass="navbar-links" />
        </h:form>
    </ui:component>
</html>
